\hypertarget{classFootPlacement}{}\doxysection{Foot\+Placement Class Reference}
\label{classFootPlacement}\index{FootPlacement@{FootPlacement}}


This class is used to generate swing leg trajectory.  




{\ttfamily \#include $<$foot\+\_\+placement.\+h$>$}

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
double \mbox{\hyperlink{classFootPlacement_ae2211312c822d1d49d61553fbf692feb}{Trajectory}} (double phase, double des1, double des2)
\begin{DoxyCompactList}\small\item\em Generate the desired swing leg z-\/position using Besier curve. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classFootPlacement_a44ed054253f62f43df8b23f60694d600}{get\+Swing\+Pos}} ()
\begin{DoxyCompactList}\small\item\em Calculate the desired position of the swing foot. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classFootPlacement_abefe39cf532cd6ee56094fd96b9aead1}{data\+Bus\+Read}} (\mbox{\hyperlink{structDataBus}{Data\+Bus}} \&robot\+State)
\begin{DoxyCompactList}\small\item\em Read data from databus. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classFootPlacement_a833b5bb6ef5578bfed4d8d50c9786fa7}{data\+Bus\+Write}} (\mbox{\hyperlink{structDataBus}{Data\+Bus}} \&robot\+State)
\begin{DoxyCompactList}\small\item\em Write swing foot information to databus. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classFootPlacement_ae58f1f2ea1c2d690d10f4c7b7b0c67d0}\label{classFootPlacement_ae58f1f2ea1c2d690d10f4c7b7b0c67d0}} 
double \mbox{\hyperlink{classFootPlacement_ae58f1f2ea1c2d690d10f4c7b7b0c67d0}{kp\+\_\+vx}} \{0\}
\begin{DoxyCompactList}\small\item\em Catersian swing foot position control gain in x-\/axis. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classFootPlacement_a9e1f6a5e58ce202d031a17be6652ce20}\label{classFootPlacement_a9e1f6a5e58ce202d031a17be6652ce20}} 
double \mbox{\hyperlink{classFootPlacement_a9e1f6a5e58ce202d031a17be6652ce20}{kp\+\_\+vy}} \{0\}
\begin{DoxyCompactList}\small\item\em Catersian swing foot position control gain in y-\/axis. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classFootPlacement_ad375e1c3c0dfa0c73e13372b092a0738}\label{classFootPlacement_ad375e1c3c0dfa0c73e13372b092a0738}} 
double \mbox{\hyperlink{classFootPlacement_ad375e1c3c0dfa0c73e13372b092a0738}{kp\+\_\+wz}} \{0\}
\begin{DoxyCompactList}\small\item\em Catersian swing foot position control gain in z-\/axis. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classFootPlacement_ab5b95a95c66387cf179dc54179d956a0}\label{classFootPlacement_ab5b95a95c66387cf179dc54179d956a0}} 
double \mbox{\hyperlink{classFootPlacement_ab5b95a95c66387cf179dc54179d956a0}{leg\+Length}} \{1\}
\begin{DoxyCompactList}\small\item\em length of the leg \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classFootPlacement_ab42c8e066a9f7d1997ca7780af64c932}\label{classFootPlacement_ab42c8e066a9f7d1997ca7780af64c932}} 
double \mbox{\hyperlink{classFootPlacement_ab42c8e066a9f7d1997ca7780af64c932}{step\+Height}} \{0.\+1\}
\begin{DoxyCompactList}\small\item\em the maximal height of the foot when walking a step \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classFootPlacement_a7efde20d6d1358c936a6d97b98993413}\label{classFootPlacement_a7efde20d6d1358c936a6d97b98993413}} 
double \mbox{\hyperlink{classFootPlacement_a7efde20d6d1358c936a6d97b98993413}{phi}} \{0\}
\begin{DoxyCompactList}\small\item\em phase varialbe for trajectory generation, must between 0 and 1 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classFootPlacement_a3aa4e1578da7623da69007b491e8765b}\label{classFootPlacement_a3aa4e1578da7623da69007b491e8765b}} 
double \mbox{\hyperlink{classFootPlacement_a3aa4e1578da7623da69007b491e8765b}{t\+Swing}} \{0.\+4\}
\begin{DoxyCompactList}\small\item\em swing time \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classFootPlacement_a70def6c5b0680f0faf26967b2bc6a6c5}\label{classFootPlacement_a70def6c5b0680f0faf26967b2bc6a6c5}} 
Eigen\+::\+Vector3d {\bfseries pos\+Start\+\_\+W}
\item 
\mbox{\Hypertarget{classFootPlacement_a6d60a94ecdf36e15bcf2965431a3168d}\label{classFootPlacement_a6d60a94ecdf36e15bcf2965431a3168d}} 
Eigen\+::\+Vector3d {\bfseries pos\+Des\+\_\+W}
\item 
\mbox{\Hypertarget{classFootPlacement_ada37cb5fced90493462b17b224cc5252}\label{classFootPlacement_ada37cb5fced90493462b17b224cc5252}} 
Eigen\+::\+Vector3d {\bfseries hip\+Pos\+\_\+W}
\item 
\mbox{\Hypertarget{classFootPlacement_a2cdda47344b6685852f8346ec351f8c1}\label{classFootPlacement_a2cdda47344b6685852f8346ec351f8c1}} 
Eigen\+::\+Vector3d \mbox{\hyperlink{classFootPlacement_a2cdda47344b6685852f8346ec351f8c1}{S\+T\+Pos\+\_\+W}}
\begin{DoxyCompactList}\small\item\em step position in world coordinate \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classFootPlacement_a8d95921529c504c6571e2d0639e36f36}\label{classFootPlacement_a8d95921529c504c6571e2d0639e36f36}} 
Eigen\+::\+Vector3d {\bfseries des\+V\+\_\+W}
\item 
\mbox{\Hypertarget{classFootPlacement_a2c65ca56953f4f104ff55200656cffee}\label{classFootPlacement_a2c65ca56953f4f104ff55200656cffee}} 
Eigen\+::\+Vector3d \mbox{\hyperlink{classFootPlacement_a2c65ca56953f4f104ff55200656cffee}{cur\+V\+\_\+W}}
\begin{DoxyCompactList}\small\item\em desired and current body velocity in world coordinate \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classFootPlacement_a65426884931e20e457a72ebd2885ca91}\label{classFootPlacement_a65426884931e20e457a72ebd2885ca91}} 
double \mbox{\hyperlink{classFootPlacement_a65426884931e20e457a72ebd2885ca91}{des\+Wz\+\_\+W}}
\begin{DoxyCompactList}\small\item\em desired angular velocity projected on z-\/axis \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classFootPlacement_aa56a97026449da92c7bb7e65374a26bc}\label{classFootPlacement_aa56a97026449da92c7bb7e65374a26bc}} 
Eigen\+::\+Vector3d \mbox{\hyperlink{classFootPlacement_aa56a97026449da92c7bb7e65374a26bc}{base\+\_\+pos}}
\begin{DoxyCompactList}\small\item\em current position of robot base in world coordinate \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classFootPlacement_a8bc8c4f7d3ffc58d244cfc3935e31c13}\label{classFootPlacement_a8bc8c4f7d3ffc58d244cfc3935e31c13}} 
\mbox{\hyperlink{structDataBus_a0dcb8a4552bb6b37259a61d601cd7d7e}{Data\+Bus\+::\+Leg\+State}} \mbox{\hyperlink{classFootPlacement_a8bc8c4f7d3ffc58d244cfc3935e31c13}{leg\+State}}
\begin{DoxyCompactList}\small\item\em record the leg state, used to make swing motion inward \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This class is used to generate swing leg trajectory. 



Definition at line 18 of file foot\+\_\+placement.\+h.



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classFootPlacement_abefe39cf532cd6ee56094fd96b9aead1}\label{classFootPlacement_abefe39cf532cd6ee56094fd96b9aead1}} 
\index{FootPlacement@{FootPlacement}!dataBusRead@{dataBusRead}}
\index{dataBusRead@{dataBusRead}!FootPlacement@{FootPlacement}}
\doxysubsubsection{\texorpdfstring{dataBusRead()}{dataBusRead()}}
{\footnotesize\ttfamily void Foot\+Placement\+::data\+Bus\+Read (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structDataBus}{Data\+Bus}} \&}]{robot\+State }\end{DoxyParamCaption})}



Read data from databus. 


\begin{DoxyParams}{Parameters}
{\em robot\+State} & \\
\hline
\end{DoxyParams}


Definition at line 11 of file foot\+\_\+placement.\+cpp.



References Data\+Bus\+::base\+\_\+omega\+\_\+W, base\+\_\+pos, Data\+Bus\+::base\+\_\+pos, Data\+Bus\+::base\+\_\+rot, cur\+V\+\_\+W, des\+Wz\+\_\+W, Data\+Bus\+::dq, Data\+Bus\+::js\+\_\+omega\+\_\+des, Data\+Bus\+::js\+\_\+vel\+\_\+des, leg\+State, Data\+Bus\+::leg\+State, phi, Data\+Bus\+::phi, Data\+Bus\+::pos\+Hip\+\_\+W, Data\+Bus\+::rpy, Data\+Bus\+::swing\+Start\+Pos\+\_\+W, Data\+Bus\+::theta0, t\+Swing, Data\+Bus\+::t\+Swing, and Data\+Bus\+::width\+\_\+hips.

\mbox{\Hypertarget{classFootPlacement_a833b5bb6ef5578bfed4d8d50c9786fa7}\label{classFootPlacement_a833b5bb6ef5578bfed4d8d50c9786fa7}} 
\index{FootPlacement@{FootPlacement}!dataBusWrite@{dataBusWrite}}
\index{dataBusWrite@{dataBusWrite}!FootPlacement@{FootPlacement}}
\doxysubsubsection{\texorpdfstring{dataBusWrite()}{dataBusWrite()}}
{\footnotesize\ttfamily void Foot\+Placement\+::data\+Bus\+Write (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structDataBus}{Data\+Bus}} \&}]{robot\+State }\end{DoxyParamCaption})}



Write swing foot information to databus. 


\begin{DoxyParams}{Parameters}
{\em robot\+State} & \\
\hline
\end{DoxyParams}


Definition at line 27 of file foot\+\_\+placement.\+cpp.



References Data\+Bus\+::base\+\_\+rpy\+\_\+des, Data\+Bus\+::swing\+\_\+fe\+\_\+pos\+\_\+des\+\_\+W, and Data\+Bus\+::swing\+\_\+fe\+\_\+rpy\+\_\+des\+\_\+W.

\mbox{\Hypertarget{classFootPlacement_a44ed054253f62f43df8b23f60694d600}\label{classFootPlacement_a44ed054253f62f43df8b23f60694d600}} 
\index{FootPlacement@{FootPlacement}!getSwingPos@{getSwingPos}}
\index{getSwingPos@{getSwingPos}!FootPlacement@{FootPlacement}}
\doxysubsubsection{\texorpdfstring{getSwingPos()}{getSwingPos()}}
{\footnotesize\ttfamily void Foot\+Placement\+::get\+Swing\+Pos (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Calculate the desired position of the swing foot. 

The result is stored in variable p\+Des\+Cur 

Definition at line 31 of file foot\+\_\+placement.\+cpp.



References base\+\_\+pos, cur\+V\+\_\+W, des\+Wz\+\_\+W, kp\+\_\+vx, kp\+\_\+vy, kp\+\_\+wz, leg\+Length, leg\+State, Data\+Bus\+::\+L\+St, phi, step\+Height, Trajectory(), and t\+Swing.

\mbox{\Hypertarget{classFootPlacement_ae2211312c822d1d49d61553fbf692feb}\label{classFootPlacement_ae2211312c822d1d49d61553fbf692feb}} 
\index{FootPlacement@{FootPlacement}!Trajectory@{Trajectory}}
\index{Trajectory@{Trajectory}!FootPlacement@{FootPlacement}}
\doxysubsubsection{\texorpdfstring{Trajectory()}{Trajectory()}}
{\footnotesize\ttfamily double Foot\+Placement\+::\+Trajectory (\begin{DoxyParamCaption}\item[{double}]{phase,  }\item[{double}]{des1,  }\item[{double}]{des2 }\end{DoxyParamCaption})}



Generate the desired swing leg z-\/position using Besier curve. 


\begin{DoxyParams}{Parameters}
{\em phase} & when phi == phase, the foot is in the highest, should in \mbox{[}0,1\mbox{]} \\
\hline
{\em des1} & the highest height when stepping \\
\hline
{\em des2} & the final height when stepping \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
double 
\end{DoxyReturn}


Definition at line 66 of file foot\+\_\+placement.\+cpp.



References Bezier\+\_\+1\+D\+::get\+Out(), Bezier\+\_\+1\+D\+::P, and phi.



Referenced by get\+Swing\+Pos().



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
foot\+\_\+placement.\+h\item 
foot\+\_\+placement.\+cpp\end{DoxyCompactItemize}
